package com.diandi.activity.bean;

/**
 * 奖励节点的类型
 *
 */

public enum RewardPointType {

	
	REGISTER(1, "注册"), INVITE(2, "邀请"), INVESTMENT(3, "投资"), REPAY_CASH(4, "回款"), IMPORT_LIST(5, "导入名单"), DIRECT_GRANT(
			6, "直接发放"), manual_Import(7, "人工导入"), REAL_NAME_AUTH(8, "实名认证"), FIRST_RECHARGE(9, "首次充值"), FIRST_INVEST(
			10, "首次投资"), FIRST_INVEST_24_HOURSE(11, "24小时内投资赠送"), invest_send_hb(12, "投资送红包"), invitation(13, "邀请活动"), EWASH_REAL_NAME_AUTH(
			14, "E洗车实名认证"), EWASH_RECHARGE_FIRST(15, "E洗车首次充值"), EWASH_INVEST_FIRST(16, "E洗车首次投资"), LUCK_DRAW(17,
			"轮盘抽奖"), WEIXIN(18, "微信免登陆活动"), PK(19, "单日擂台PK战"), INVEST_ACTIVITY(20, "单次投资活动(新)"), NEW_INVITATION_ACTIVITY(
			21, "邀请活动(新)"), RE_INVEST_ACTIVITY(22, "复投活动"), CASH_BACK_IMPORT(23, "人工返现"), TOTAL_INVEST_ACTIVITY(24,
			"累计投资活动(新)"), MJ_TURN_TABLE(25, "秒借转盘抽奖"), EGG_TURN_TABLE(26, "砸蛋抽奖"), WECHAT_INVITE(27, "微信邀请活动"), LOAN_SEND_INTEGRAL(
			28, "借款送积分"), SIGN_ACTIVITY(29, "签到活动"), FIRST_BIND_CARD(30, "首次绑卡活动"), IMPORT_RECORD(31, "导入积分活动"), FREE_DRAW(
			32, "注册用户无门槛抽奖"), HQB_EXIT_ACTIVITY(33, "活期宝退出"),GET_TICKET_FREE(34, "无门槛领取奖券"),INVEST_BY_PERIOD(35, "分时段投资活动"),REWARD_TOP(36, "奖励投资前排活动")
			,MIAOJIE_ACTIVITY(37, "秒借用户抽奖")
	;

	
	/**
	 * valu1e
	 */
	private final String text;
	/**
	 * key
	 */
	private final int value;

	RewardPointType(int value, String text) {
		this.value = value;
		this.text = text;
	}

	public static RewardPointType getTextByValue(int value) {
		for (RewardPointType item : RewardPointType.values()) {
			if (item.getValue() == value) {
				return item;
			}
		}
		throw new RuntimeException(value + "不是合法的类型！");
	}

	public static RewardPointType getValueByText(String text) {
		for (RewardPointType item : RewardPointType.values()) {
			if (item.getText().equals(text)) {
				return item;
			}
		}
		throw new RuntimeException(text + "不是合法的类型！");
	}

	public String getText() {
		return text;
	}

	public int getValue() {
		return value;
	}

}
